var strings = "123"

if(typeof(strings) == "string"){
    console.log(1)
}
else if(parseInt(strings) == 123){
    console.log(2)
}

if(typeof(strings) == "string" || parseInt(strings) == 123){
    console.log("或错误")
}else{
    console.log("且错误")
}